using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Windows.Forms;

namespace Cpsc481Phone.Gui.GlobalCompents
{
    
    class OurListBox
    {
        private static SolidBrush _textBrush = new SolidBrush(SystemColors.WindowText);
        private Image image;
        private String sender;
        private String message;
        public OurListBox(Image img, String snd, String msg)
        {
            image = img;
            sender = snd;
            message = msg;
        }
        public Image getImage()
        {
            return image;
        }
        public void setImage(Image img)
        {
            image = img;
        }
        public String getSender()
        {
            return sender;
        }
        public void setSender(String snd)
        {
            sender = snd;
        }
        public String getMessage()
        {
            return message;
        }
        public void setMessage(String msg)
        {
            message = msg;
        }
        public void drawItem(DrawItemEventArgs e)
        {
            Graphics g = e.Graphics;
            Rectangle scaledRect= new Rectangle();
            scaledRect.Height = 50;
            Rectangle imageRect = new Rectangle(0, 0, 50, 50);
            g.DrawImage(getImage(), imageRect);
            g.DrawRectangle(Pens.Black, imageRect);            
            g.DrawString(getMessage(), e.Font, _textBrush , scaledRect);
        }
    }
}
